// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_DOI
// * CreateDate    : 2014-06-05 18:30:07
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:07
// * LastChanger   : 2014-06-05 18:30:07
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class InvDoiEntity : EntityBase
    {
        public InvDoiTable TableSchema
        {
            get
            {
                return InvDoiTable.Current;
            }
		}
		
		public InvDoiEntity()
        {

        }
		
		public InvDoiEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.DoId = Convert.ToString(CommonFunctions.ToObject(dr["DO_ID"]));
			this.WhId = Convert.ToString(CommonFunctions.ToObject(dr["WH_ID"]));
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.WhIdTo = Convert.ToString(CommonFunctions.ToObject(dr["WH_ID_TO"]));
			this.LocationIdTo = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID_TO"]));
        }
		
		public InvDoiEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.DoId = Convert.ToString(CommonFunctions.ToObject(dr["DO_ID"]));
			this.WhId = Convert.ToString(CommonFunctions.ToObject(dr["WH_ID"]));
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.WhIdTo = Convert.ToString(CommonFunctions.ToObject(dr["WH_ID_TO"]));
			this.LocationIdTo = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID_TO"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvDoiTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(InvDoiTable.C_ID)); }
            set { SetData(InvDoiTable.C_ID, value); }
        }
		
        [DataMember]
        public string DoId
        {
            get { return Convert.ToString(GetData(InvDoiTable.C_DO_ID)); }
            set { SetData(InvDoiTable.C_DO_ID, value); }
        }
		
        [DataMember]
        public string WhId
        {
            get { return Convert.ToString(GetData(InvDoiTable.C_WH_ID)); }
            set { SetData(InvDoiTable.C_WH_ID, value); }
        }
		
        [DataMember]
        public string LocationId
        {
            get { return Convert.ToString(GetData(InvDoiTable.C_LOCATION_ID)); }
            set { SetData(InvDoiTable.C_LOCATION_ID, value); }
        }
		
        [DataMember]
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(InvDoiTable.C_QTY)); }
            set { SetData(InvDoiTable.C_QTY, value); }
        }
		
        [DataMember]
        public string WhIdTo
        {
            get { return Convert.ToString(GetData(InvDoiTable.C_WH_ID_TO)); }
            set { SetData(InvDoiTable.C_WH_ID_TO, value); }
        }
		
        [DataMember]
        public string LocationIdTo
        {
            get { return Convert.ToString(GetData(InvDoiTable.C_LOCATION_ID_TO)); }
            set { SetData(InvDoiTable.C_LOCATION_ID_TO, value); }
        }
		
		#endregion
	}
	
	
}	

